home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / extractor0.1.0.lha / README < prev    next >
Text File  |  2002-06-07  |  2KB  |  45 lines

  1. libExtractor
  2. ============
  3.  
  4. libExtractor is a simple library for keyword extraction. 
  5. libExtractor does not support all formats but supports
  6. a simple plugging mechanism such that you can quickly
  7. add extractors for additional formats, even without
  8. recompiling libExtractor. libExtractor typically
  9. ships with one or more helper-libraries that can be
  10. used to obtain keywords from common file-types.
  11.  
  12. If you want to write your own extractor for some filetype,
  13. all you need to do is write a little library that implements
  14. a single method with this signature:
  15.  
  16.  
  17. KeywordList * extract(const char * filename,
  18.                       char * data,
  19.                       size_t size,
  20.               KeywordList * prev);
  21.  
  22.  
  23. The filename is the name of the file, data is a pointer
  24. to the contents of the file and size is the size of the file.
  25. The extract method must prepend keywords that it finds
  26. to the linked list 'prev' and return the new head.
  27. The library must allocate (malloc) the entry in the
  28. keyword list and the memory for the filename since both
  29. will be free'ed by libExtractor once the application calls
  30. freeKeywords.
  31.  
  32. An example implementation can be found in mp3extractor.c.
  33.  
  34. notes
  35. =====
  36. Please note, if you install libextractor in location that the linker does not
  37. know about (i.e. is not in /etc/ld.so.conf) you /must/ set
  38. LD_LIBRARY_PATH=/path/to/libextractor. It is recommended that you have this
  39. set in your shells initialization file so that it is always set. This can be
  40. accomplished in bash by adding the following line to ~/.bashrc
  41. export LD_LIBRARY_PATH="/path/to/libextractor:$LD_LIBRARY_PATH"
  42. or in csh/tcsh by adding the following line to ~/.cshrc
  43. setenv LD_LIBRARY_PATH "/path/to/libextractor:$LD_LIBRARY_PATH"
  44.  
  45.